<!DOCTYPE html>
<html lang="en" xmlns:p="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
</head>
<body>
<div align="center"><h1>SysOrder管理系统登录界面</h1></div>
<table class="table table-striped">
    <tr><td>id</td>
        <td>order_id</td>
        <td>goods_id</td>
        <td>quatity</td>
        <td>total</td>
        <td>describtion</td>
        <td>goods_id : name : price</td>
    </tr>

    <tr th:each="sysOrderDetail:${pageInfo.list}">
        <td th:text="${sysOrderDetail.id}"></td>
        <td th:text="${sysOrderDetail.orderId}"></td>
        <td th:text="${sysOrderDetail.goodsId}"></td>
        <td th:text="${sysOrderDetail.quatity}"></td>
        <td th:text="${sysOrderDetail.total}"></td>
        <td th:text="${sysOrderDetail.describtion}"></td>
        <td>
            <div th:each="sysOrderDetailgoods:${sysOrderDetail.goods}">
                <span th:text="${sysOrderDetailgoods.id}"/>:
                <span th:text="${sysOrderDetailgoods.name}"/>:
                <span th:text="${sysOrderDetailgoods.price}"/>:
                <span th:text="${sysOrderDetailgoods.describtion}"/><br/>
            </div>
        </td>


        <td ><a th:href="@{/SysOrderDetail/delete.do(id=${sysOrderDetail.id})}">删除</a>
            <a th:href="@{/SysOrderDetail/toUpdate.do(id=${sysOrderDetail.id})}">修改</a></td>
    </tr>

</table>
<nav aria-label="Page navigation example">
    <ul class="pagination justify-content-end">
        <li class="page-item ">
            <a class="page-link" th:if="${not pageInfo.isFirstPage}" th:href="@{${'/SysOrderDetail/list.do'}(pageNum=${1},pageSize=${pageInfo.pageSize})}" >
                首页
            </a>
            <a class="page-link" th:if="${pageInfo.isFirstPage}" href="javascript:void(0);">
                首页
            </a>
        </li>
        <li class="page-item ">

            <a class="page-link" th:if="${not pageInfo.isFirstPage}" th:href="@{${'/SysOrderDetail/list.do'}(pageNum=${pageInfo.pageNum-1},pageSize=${pageInfo.pageSize})}" >
                前页
            </a>
            <a class="page-link" th:if="${pageInfo.isFirstPage}" href="javascript:void(0);" >
                前页
            </a>
        </li>
        <li class="page-item " th:each="pageNo : ${pageInfo.navigatepageNums}">
            <a class="page-link" th:if="${pageInfo.pageNum eq pageNo}" href="javascript:void(0);">
                <span th:text="${pageNo}"></span>
            </a>

            <a class="page-link" th:if="${not (pageInfo.pageNum eq pageNo)}" th:href="@{${'/SysOrderDetail/list.do'}(pageNum=${pageNo},pageSize=${pageInfo.pageSize})}">
                <span th:text="${pageNo}"></span>
            </a>
        </li>

        <li class="page-item ">
            <a class="page-link" th:if="${not pageInfo.isLastPage}" th:href="@{${'/SysOrderDetail/list.do'}(pageNum=${pageInfo.pageNum+1},pageSize=${pageInfo.pageSize})}" aria-label="Next">
                下一页
            </a>
            <a class="page-link" th:if="${pageInfo.isLastPage}" href="javascript:void(0);" aria-label="Next">
                下一页
            </a>
        </li>
        <li class="page-item ">
            <a class="page-link" th:if="${not pageInfo.isLastPage}" th:href="@{${'/SysOrderDetail/list.do'}(pageNum=${pageInfo.pages},pageSize=${pageInfo.pageSize})}" >
                最后一页
            </a>
            <a class="page-link" th:if="${pageInfo.isLastPage}" href="javascript:void(0);" >
                最后一页
            </a>
        </li>
    </ul>
</nav>

<tr><a href="/SysOrderDetail/toAdd.do">添加订单详情</a></tr>
</body>
</html>
